public class PhoneDirector {
    private PhoneBuilder builder ;
    public PhoneDirector(PhoneBuilder concreteBuilder){
        this.builder = concreteBuilder;
    }

    public ProductPhone constructPhone(){
        this.builder.buildscreen();
        this.builder.buildchip();
        this.builder.buildbattery();
        return  this.builder.getPhoneProduct();
    }

    public void setBuilder(PhoneBuilder builder) {
        this.builder = builder;
    }
}
